class Direccion < ActiveRecord::Base
 
  belongs_to :cliente
  has_one :orden_servicio, :dependent => :destroy
  

  
  validates_presence_of     :nombre
  validates_length_of       :nombre,    :maximum => 50
  validates_presence_of     :residencia_calle
  validates_length_of       :residencia_calle,    :maximum => 50
  validates_presence_of     :apartamento_num_casa
  validates_length_of       :apartamento_num_casa,    :maximum => 50
  validates_presence_of     :urbanizacion
  validates_length_of       :urbanizacion,    :maximum => 50
  validates_presence_of     :ciudad
  validates_length_of       :ciudad,    :maximum => 50
  validates_presence_of     :pais
  validates_length_of       :pais,    :maximum => 50
  validates_presence_of     :latitud
  validates_length_of       :latitud,    :maximum => 50
  validates_presence_of     :longitud
  validates_length_of       :longitud,    :maximum => 50
  validates_presence_of     :codigo_postal
  validates_length_of       :codigo_postal,    :maximum => 5
  
  
end
